<?php

class Api{
    function put($req){
        $id = intval($req->param);
        $userId = $req->auth["id"];
        $token = Auth::gen_token($id,$userId);
        $res = array(
            "token"=>$token['token']
        );
        return $res;
    }
    function delete($req){
        $userId = $req->auth["logas"];
        $token = Auth::gen_token($userId,null);
        $res = array(
            "token"=>$token['token']
        );
        return $res;
    }
}
